package m.server;

import java.io.IOException;
import java.net.Socket;

public abstract class ServerHandler implements Runnable {
    private final Socket socket;
    private final ReadBody readBody;
    public ServerHandler(Socket socket) {
        this.socket=socket;
        try {
            this.readBody=new ReadBody(socket.getInputStream());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    public Socket getSocket(){
        return this.socket;
    }
    public ReadBody getReadBody(){
        return this.readBody;
    }
}
